package com.example.sunmiv1.entity;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class WarehousingDetailInfo implements Serializable {

    /**
     * data : [{"id":"450","merchant_id":"1","store_id":"1","warehouse_id":"252","stock_out_id":"122","warehouse_record_id":"218","goods_class_id":"514","goods_id":"2187","sku_id":"652","goods_name":"3333S,60g","sku_name":"S,60g","sku_id_list":"1,12","goods_number":"30662-1","sku_goods_number":"30662-1","goods_code":"1390906163-1","sku_code":"1390906163-1","company":"","attribute_state":"2","pricing_method":"1","sku_num":1,"stock_price":3,"stock_num":1,"subtotal":3,"remarks":"yyyyyy","stock_order_number":"MD201909280122","type":"1","add_time":"1569652149","index":1}]
     * status : 1
     */

    private int status;
    private List<DataBean> data;

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public List<DataBean> getData() {
        if (data == null) {
            return new ArrayList<>();
        }
        return data;
    }

    public void setData(List<DataBean> data) {
        this.data = data;
    }

    public static class DataBean implements Serializable {
        /**
         * id : 450
         * merchant_id : 1
         * store_id : 1
         * warehouse_id : 252
         * stock_out_id : 122
         * warehouse_record_id : 218
         * goods_class_id : 514
         * goods_id : 2187
         * sku_id : 652
         * goods_name : 3333S,60g
         * sku_name : S,60g
         * sku_id_list : 1,12
         * goods_number : 30662-1
         * sku_goods_number : 30662-1
         * goods_code : 1390906163-1
         * sku_code : 1390906163-1
         * company :
         * attribute_state : 2
         * pricing_method : 1
         * sku_num : 1
         * stock_price : 3
         * stock_num : 1
         * subtotal : 3
         * remarks : yyyyyy
         * stock_order_number : MD201909280122
         * type : 1
         * add_time : 1569652149
         * index : 1
         */

        private String id;
        private String merchant_id;
        private String store_id;
        private String warehouse_id;
        private String stock_out_id;
        private String warehouse_record_id;
        private String goods_class_id;
        private String goods_id;
        private String sku_id;
        private String goods_name;
        private String sku_name;
        private String sku_id_list;
        private String goods_number;
        private String sku_goods_number;
        private String goods_code;
        private String sku_code;
        private String company;
        private String attribute_state;  //  2== 規格商品
        private String pricing_method;
        private double sku_num;
        private double stock_price;
        private double stock_num;
        private double warehouse_num;
        private double warehouse_price;
        private double subtotal;
        private String remarks;
        private String stock_order_number;
        private String type;
        private String add_time;
        private int index;
        private boolean checked;
        private String serial_number_state;
        private List<SerialListBean> serial_list;
        private List<SerialListBean> serialList;//所有的串號

        public DataBean(WarehousingDetailInfo.DataBean d) {
            this.id = d.getId();
            this.merchant_id = d.getMerchant_id();
            this.store_id = d.getStore_id();
            this.warehouse_id = d.getWarehouse_id();
            this.stock_out_id = d.getStock_out_id();
            this.warehouse_record_id = d.getWarehouse_record_id();
            this.goods_class_id = d.getGoods_class_id();
            this.goods_id = d.getGoods_id();
            this.sku_id = d.getSku_id();
            this.goods_name = d.getGoods_name();
            this.sku_name = d.getSku_name();
            this.sku_id_list = d.getSku_id_list();
            this.goods_number = d.getGoods_number();
            this.sku_goods_number = d.getSku_goods_number();
            this.goods_code = d.getGoods_code();
            this.sku_code = d.getSku_code();
            this.company = d.getCompany();
            this.attribute_state = d.getAttribute_state();
            this.pricing_method = d.getPricing_method();
            this.sku_num = d.getSku_num();
            this.stock_price = d.getStock_price();
            this.stock_num = d.getStock_num();
            this.warehouse_num = d.getWarehouse_num();
            this.warehouse_price = d.getWarehouse_price();
            this.subtotal = d.getSubtotal();
            this.remarks = d.getRemarks();
            this.stock_order_number = d.getStock_order_number();
            this.type = d.getType();
            this.add_time = d.getAdd_time();
            this.index = d.getIndex();
            this.checked = d.isChecked();
        }

        public String getNumber() {
            if ("2".equals(attribute_state)) {
                return sku_goods_number;
            } else {
                return goods_number;
            }
        }

        public String getCode() {
            if ("2".equals(attribute_state)) {
                return sku_code;
            } else {
                return goods_code;
            }
        }

        public String getSerial_number_state() {
            return serial_number_state == null ? "" : serial_number_state;
        }

        public void setSerial_number_state(String serial_number_state) {
            this.serial_number_state = serial_number_state;
        }

        public List<SerialListBean> getSerial_list() {
            if (serial_list == null) {
                return new ArrayList<>();
            }
            return serial_list;
        }

        public void setSerial_list(List<SerialListBean> serial_list) {
            this.serial_list = serial_list;
        }

        public List<SerialListBean> getSerialList() {
            if (serialList == null) {
                return new ArrayList<>();
            }
            return serialList;
        }

        public void setSerialList(List<SerialListBean> serialList) {
            this.serialList = serialList;
        }

        public String getId() {
            return id == null ? "" : id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getMerchant_id() {
            return merchant_id == null ? "" : merchant_id;
        }

        public void setMerchant_id(String merchant_id) {
            this.merchant_id = merchant_id;
        }

        public String getStore_id() {
            return store_id == null ? "" : store_id;
        }

        public void setStore_id(String store_id) {
            this.store_id = store_id;
        }

        public String getWarehouse_id() {
            return warehouse_id == null ? "" : warehouse_id;
        }

        public void setWarehouse_id(String warehouse_id) {
            this.warehouse_id = warehouse_id;
        }

        public String getStock_out_id() {
            return stock_out_id == null ? "" : stock_out_id;
        }

        public void setStock_out_id(String stock_out_id) {
            this.stock_out_id = stock_out_id;
        }

        public String getWarehouse_record_id() {
            return warehouse_record_id == null ? "" : warehouse_record_id;
        }

        public void setWarehouse_record_id(String warehouse_record_id) {
            this.warehouse_record_id = warehouse_record_id;
        }

        public String getGoods_class_id() {
            return goods_class_id == null ? "" : goods_class_id;
        }

        public void setGoods_class_id(String goods_class_id) {
            this.goods_class_id = goods_class_id;
        }

        public String getGoods_id() {
            return goods_id == null ? "" : goods_id;
        }

        public void setGoods_id(String goods_id) {
            this.goods_id = goods_id;
        }

        public String getSku_id() {
            return sku_id == null ? "" : sku_id;
        }

        public void setSku_id(String sku_id) {
            this.sku_id = sku_id;
        }

        public String getGoods_name() {
            return goods_name == null ? "" : goods_name;
        }

        public void setGoods_name(String goods_name) {
            this.goods_name = goods_name;
        }

        public String getSku_name() {
            return sku_name == null ? "" : sku_name;
        }

        public void setSku_name(String sku_name) {
            this.sku_name = sku_name;
        }

        public String getSku_id_list() {
            return sku_id_list == null ? "" : sku_id_list;
        }

        public void setSku_id_list(String sku_id_list) {
            this.sku_id_list = sku_id_list;
        }

        public String getGoods_number() {
            return goods_number == null ? "" : goods_number;
        }

        public void setGoods_number(String goods_number) {
            this.goods_number = goods_number;
        }

        public String getSku_goods_number() {
            return sku_goods_number == null ? "" : sku_goods_number;
        }

        public void setSku_goods_number(String sku_goods_number) {
            this.sku_goods_number = sku_goods_number;
        }

        public String getGoods_code() {
            return goods_code == null ? "" : goods_code;
        }

        public void setGoods_code(String goods_code) {
            this.goods_code = goods_code;
        }

        public String getSku_code() {
            return sku_code == null ? "" : sku_code;
        }

        public void setSku_code(String sku_code) {
            this.sku_code = sku_code;
        }

        public String getCompany() {
            return company == null ? "" : company;
        }

        public void setCompany(String company) {
            this.company = company;
        }

        public String getAttribute_state() {
            return attribute_state == null ? "" : attribute_state;
        }

        public void setAttribute_state(String attribute_state) {
            this.attribute_state = attribute_state;
        }

        public String getPricing_method() {
            return pricing_method == null ? "" : pricing_method;
        }

        public void setPricing_method(String pricing_method) {
            this.pricing_method = pricing_method;
        }

        public double getSku_num() {
            return sku_num;
        }

        public void setSku_num(double sku_num) {
            this.sku_num = sku_num;
        }

        public double getStock_price() {
            return stock_price;
        }

        public void setStock_price(double stock_price) {
            this.stock_price = stock_price;
        }

        public double getStock_num() {
            return stock_num;
        }

        public void setStock_num(double stock_num) {
            this.stock_num = stock_num;
        }

        public double getWarehouse_num() {
            return warehouse_num;
        }

        public void setWarehouse_num(double warehouse_num) {
            this.warehouse_num = warehouse_num;
        }

        public double getWarehouse_price() {
            return warehouse_price;
        }

        public void setWarehouse_price(double warehouse_price) {
            this.warehouse_price = warehouse_price;
        }

        public double getSubtotal() {
            return subtotal;
        }

        public void setSubtotal(double subtotal) {
            this.subtotal = subtotal;
        }

        public String getRemarks() {
            return remarks == null ? "" : remarks;
        }

        public void setRemarks(String remarks) {
            this.remarks = remarks;
        }

        public String getStock_order_number() {
            return stock_order_number == null ? "" : stock_order_number;
        }

        public void setStock_order_number(String stock_order_number) {
            this.stock_order_number = stock_order_number;
        }

        public String getType() {
            return type == null ? "" : type;
        }

        public void setType(String type) {
            this.type = type;
        }

        public String getAdd_time() {
            return add_time == null ? "" : add_time;
        }

        public void setAdd_time(String add_time) {
            this.add_time = add_time;
        }

        public int getIndex() {
            return index;
        }

        public void setIndex(int index) {
            this.index = index;
        }

        public boolean isChecked() {
            return checked;
        }

        public void setChecked(boolean checked) {
            this.checked = checked;
        }

        public static class SerialListBean implements Serializable {
            private String id;
            private String main_serial_number;
            private String auxiliary_serial_number_one;
            private String auxiliary_serial_number_two;
            private boolean check;

            public SerialListBean(String id, String main_serial_number, String auxiliary_serial_number_one, String auxiliary_serial_number_two) {
                this.id = id;
                this.main_serial_number = main_serial_number;
                this.auxiliary_serial_number_one = auxiliary_serial_number_one;
                this.auxiliary_serial_number_two = auxiliary_serial_number_two;
            }

            public boolean isCheck() {
                return check;
            }

            public void setCheck(boolean check) {
                this.check = check;
            }

            public String getMain_serial_number() {
                return main_serial_number == null ? "" : main_serial_number;
            }

            public void setMain_serial_number(String main_serial_number) {
                this.main_serial_number = main_serial_number;
            }

            public String getAuxiliary_serial_number_one() {
                return auxiliary_serial_number_one == null ? "" : auxiliary_serial_number_one;
            }

            public void setAuxiliary_serial_number_one(String auxiliary_serial_number_one) {
                this.auxiliary_serial_number_one = auxiliary_serial_number_one;
            }

            public String getAuxiliary_serial_number_two() {
                return auxiliary_serial_number_two == null ? "" : auxiliary_serial_number_two;
            }

            public void setAuxiliary_serial_number_two(String auxiliary_serial_number_two) {
                this.auxiliary_serial_number_two = auxiliary_serial_number_two;
            }
        }
    }
}
